package com.clei.utils.container;

/**
 * 临时容器
 * 用来装一些可变对象
 *
 * @param <T> 泛型
 * @author Y
 * @date 2022-05-13
 */
public final class Container<T> {

    private T obj;

    private Container(T obj) {
        this.obj = obj;
    }

    public static <T> Container<T> of(T obj) {
        return new Container<>(obj);
    }

    public T get() {
        return obj;
    }

    public void set(T obj) {
        this.obj = obj;
    }
}
